load("@fbsource//tools/build_defs:rust_library.bzl", "rust_library")

oncall("build_infra")

rust_library(
    name = "buck2_test",
    srcs = glob(["src/**/*.rs"]),
    os_deps = [
        (
            "linux",
            [
                "fbsource//third-party/rust:libc",
            ],
        ),
        (
            "macos",
            [
                "fbsource//third-party/rust:libc",
            ],
        ),
    ],
    test_deps = [
        "fbsource//third-party/rust:maplit",
    ],
    deps = [
        "fbsource//third-party/rust:anyhow",
        "fbsource//third-party/rust:async-trait",
        "fbsource//third-party/rust:chrono",
        "fbsource//third-party/rust:dashmap",
        "fbsource//third-party/rust:derive_more",
        "fbsource//third-party/rust:futures",
        "fbsource//third-party/rust:fxhash",
        "fbsource//third-party/rust:indexmap",
        "fbsource//third-party/rust:itertools",
        "fbsource//third-party/rust:once_cell",
        "fbsource//third-party/rust:serde",
        "fbsource//third-party/rust:serde_json",
        "fbsource//third-party/rust:tokio",
        "fbsource//third-party/rust:tracing",
        "fbsource//third-party/rust:uuid",
        "//buck2/allocative/allocative:allocative",
        "//buck2/app/buck2_build_api:buck2_build_api",
        "//buck2/app/buck2_build_signals:buck2_build_signals",
        "//buck2/app/buck2_cli_proto:buck2_cli_proto",
        "//buck2/app/buck2_common:buck2_common",
        "//buck2/app/buck2_core:buck2_core",
        "//buck2/app/buck2_data:buck2_data",
        "//buck2/app/buck2_downward_api:buck2_downward_api",
        "//buck2/app/buck2_error:buck2_error",
        "//buck2/app/buck2_error_derive:buck2_error_derive",
        "//buck2/app/buck2_events:buck2_events",
        "//buck2/app/buck2_execute:buck2_execute",
        "//buck2/app/buck2_execute_impl:buck2_execute_impl",
        "//buck2/app/buck2_fs:buck2_fs",
        "//buck2/app/buck2_grpc:buck2_grpc",
        "//buck2/app/buck2_interpreter:buck2_interpreter",
        "//buck2/app/buck2_interpreter_for_build:buck2_interpreter_for_build",
        "//buck2/app/buck2_node:buck2_node",
        "//buck2/app/buck2_resource_control:buck2_resource_control",
        "//buck2/app/buck2_server_ctx:buck2_server_ctx",
        "//buck2/app/buck2_test_api:buck2_test_api",
        "//buck2/app/buck2_util:buck2_util",
        "//buck2/dice/dice:dice",
        "//buck2/dice/dice_futures:dice_futures",
        "//buck2/gazebo/display_container:display_container",
        "//buck2/gazebo/dupe:dupe",
        "//buck2/host_sharing:host_sharing",
        "//buck2/remote_execution:remote_execution",
        "//buck2/starlark-rust/starlark:starlark",
        "//common/rust/shed/sorted_vector_map:sorted_vector_map",
    ],
)
